

package usercodedeployment;

import com.hazelcast.map.EntryProcessor;

import java.util.Map;

/**
 * contains class `EntryProcessorWithAnonymousAndInner`, to exercise loading classes with anonymous and named inner classes
 */
public class EntryProcessorWithAnonymousAndInner<K> implements EntryProcessor<K, Integer, Integer> {
    private static final long serialVersionUID = 8936595533044945435L;

    public EntryProcessorWithAnonymousAndInner() {
    }

    public Integer process(Map.Entry<K, Integer> var1) {
        Integer var2 = (Integer) var1.getValue();
        Integer var3 = var2 + 1;
        Test var4 = new Test(var1);
        Runnable var5 = () -> {
            var4.set(var3);
        };
        var5.run();
        return var3;
    }

    public class Test<K> {
        private final Map.Entry<K, Integer> entry;

        Test(Map.Entry<K, Integer> var2) {
            this.entry = var2;
        }

        void set(Integer var1) {
            this.entry.setValue(var1);
        }
    }
}
